<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        let input=`155`
        let count=0;
        input=parseInt(input,10)
        while(input!=1){
            if(input%2!=0){
                input++;
                count++;                
            }else{
                input/=2;
                count++;
            }
            
        }
        console.log(count);
        
        
    </script>
</body>
</html>